<?php session_start(); ?>


<html>
    <head>
        <title>Triumph TTS</title>
        <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>

        <style type='text/css'>
            <!--
            body {
	background-color: #666666;
	margin-left: 17px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
            }
            -->
        </style>


        <script type='text/javascript' src='tabber.js'></script>
        <link rel='stylesheet' href='triumph.css' TYPE='text/css' MEDIA='screen'>


        <script type='text/javascript'>

            /* Optional: Temporarily hide the 'tabber' class so it does not 'flash'
           on the page as plain HTML. After tabber runs, the class is changed
           to 'tabberlive' and it will appear. */

            document.write('<style type='text/css'>.tabber{display:none;}<\/style>');
        </script>



        <style type="text/css">
            <!--
            .style3 {color: #FFFFFF}
            -->
        </style>

    </head>

    <body text="#FFFFFF">
        <CENTER>
        <form action="TicketEditFunc.php" method="POST" id="ticketAddForm">
          <table id='Table_01' width='1000' height='713' border='0' cellpadding='0' cellspacing='0'>
                <tr><td align="center" bgcolor='#454343'><h2>Ticket</h2></td></tr>
                <TR bordercolor='#000000'>
                    <TD width="1000" height='2' bgcolor='#454343'></TD>
                </TR>
                <TR bordercolor='#000000'>
                    <TD height='2' bgcolor='#454343'></TD>
                </TR>

                <!--MAIN BODY TABLE ROW -->
                <TR bordercolor='#000000' bgcolor='#454343'>
                    <TD height='249'>


                        <script type='text/javascript' src='tabber.js'>
                        </script>



                        <div class='tabber'>

                            <div class='tabbertab'>
                                <h2>Ticket</h2>

                                <center>
                                    <table>
                                        <tr>
                                            <th colspan="5" align="center">Ticket</th>
                                        </tr>
                                        <tr>
                                            <td colspan="1" align="center">Expected Complete Date:</td>
                                            <td><input type="text"  maxlength="25" id="cmplt" name ="cmplt"></td>
                                        </tr>
                                        <tr>
                                            <th colspan="5" align="center">Employee Information</th>
                                        </tr>
                                        <tr>
                                            <td align="left">Employee ID:</td>
                                            <td><input type="text"  maxlength="25" id="empid" name ="empid" readonly="true"> </td>
                                        </tr>
                                        <tr>
                                            <td align="left">First Name:</td>
                                            <td><input type="text"  maxlength="25" id="empfirst" name ="empfirst" readonly="true"></td>
                                            <td align="left">Last Name:</td>
                                            <td><input type="text"  maxlength="25" id="emplast" name ="emplast" readonly="true"></td>
                                        </tr>
                                        <tr>
                                            <td align="left">Login ID:</td>
                                            <td><input type="text"  maxlength="25" id="emplogin" name ="emplogin" readonly="true"></td>
                                            <td align="left">Role:</td>
                                            <td><input type="text"  maxlength="25" id="emprole" name ="emprole" readonly="true"></td>

                                        </tr>
                                        <tr>
                                            <td align="left">Is Deleted:</td>
                                            <td><input type="text"  maxlength="25" id="isdeleted" name ="isdeleted" readonly="true"></td>
                                            <td></td>
                                            <td align="center"><input type="button" value="Import Employee" onclick="openEmployeeWindow();"> </td>


                                        </tr>

                                    </table>
                                </center>
                                <script type="text/javascript">
                                    function openEmployeeWindow()
                                    {
                                        window.showModalDialog('EmployeePopUp.php','','dialogWidth:1000px; dialogHeight:300px; center:yes');
                                    }

                                </script>

                            </div>

                            <div class='tabbertab'>
                                <h2>Customer Information</h2>
                                <center>
                                    <table>
                                        <tr>
                                            <th colspan="6" align="center">Customer Information</th>
                                        </tr>
                                        <tr>
                                            <td align="left">Customer ID:</td>
                                            <td><input type="text"  maxlength="25" id="id" name ="id" readonly="true"> </td>
                                        </tr>
                                        <tr>
                                            <td align="left">First Name:</td>
                                            <td><input type="text"  maxlength="25" id="first" name ="first" readonly="true"></td>
                                            <td align="left">Last Name:</td>
                                            <td><input type="text"  maxlength="25" id="last" name ="last" readonly="true"></td>
                                        </tr>
                                        <tr>
                                            <td align="left">Address:</td>
                                            <td colspan="3"><input type="text" size="58" maxlength="45" id="addr" name ="addr" readonly="true"></td>
                                        </tr>
                                        <tr>
                                            <td align="left">City:</td>
                                            <td><input type="text"  maxlength="25" id="city" name ="city" readonly="true"></td>
                                            <td align="left">State:</td>
                                            <td><input type="text"  maxlength="25" id="state" name ="state" readonly="true"></td>
                                            <td align="left">Zip:</td>
                                            <td><input type="text"  maxlength="25" id="zip" name ="zip" readonly="true"> </td>
                                        </tr>
                                        <tr>
                                            <td align="left">Phone 1:</td>
                                            <td><input type="text"  maxlength="25" id="phone1" name ="phone1" readonly="true"></td>
                                            <td align="left">Phone 2:</td>
                                            <td><input type="text"  maxlength="25" id="phone2" name ="phone2" readonly="true"></td>
                                            <td align="left">Phone 3:</td>
                                            <td><input type="text"  maxlength="25" id="phone3" name ="phone3" readonly="true"> </td>
                                        </tr>
                                        <tr>
                                            <td align="left">Email:</td>
                                            <td><input type="text"  maxlength="25" id="email" name ="email" readonly="true"></td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td align="center"><input type="button" value="Import Customer" onClick="openCustomerWindow();"> </td>
                                        </tr>
                                    </table>
                                </center>

                                <script type="text/javascript">
                                    function openCustomerWindow()
                                    {
                                        window.showModalDialog('CustomerPopUp.php','','dialogWidth:1000px; dialogHeight:300px; center:yes');
                                    }

                                </script>
                            </div>


        <div class='tabbertab' dataSrc ="workDoneDiv.php">
           <h2>Work Done</h2>
                            <!--     <center>
                                    <table id="workDoneTable">

                                        <tr>
                                            <th colspan="4" align="center">Work Done</th>
                                        </tr>
                                        <tr>
                                            <td>Employee Assigned</td>
                                            <td><input type="hidden" id="techID" name="techID" value="<?php print($_SESSION['userID']);?>"><input type='text' readonly='readonly'  size='25' name='techName' id='techName' value="<?php print($_SESSION['EMPFIRST']);?>"></td>
                                            <td>Notes</td>
                                            <td rowspan="3"> <textarea rows='3' cols='25' size='25' name='notes' id='notes'></textarea></td>
                                        </tr>
                                        <tr>
                                            <td>Date</td>
                                            <td><input type='text'  size='25' name='dateDone' id='dateDone'></td>
                                        </tr>
                                        <tr>
                                            <td>Hours</td>
                                            <td><input type='text'  size='25' name='hours' id='hours'></td>
                                        </tr>

                                    </table>
                                </center>





                             -->
        <center>
      <table class="EditTable">
           <tr>
               <td colspan="2" align="center"><b>Work Done Functions</b></td>
           </tr>
           <tr>
               <td>
                   <input type="button" value="Add Work Done" onclick="workDonePopup();" />
               </td>
               <td>
                   <input type="button" value="Remove Last Addition" onclick="removeLast();" />
               </td>
           </tr>
       </table>
        </center>
<br/>
            <div style="width:95%; border:solid; border-width:1; background-color: #666666;">
            <table style="width:96%" id="tblWorkDoneHeader">
                        <tr >
                            <th align="center" style="width:20%">
                                Tech
                            </th>
                            <th align="center" style="width:20%">
                                Date
                            </th>
                            <th align="center" style="width:40%">
                                Notes&nbsp;&nbsp;
                            </th>
                            <th align="center" style="width:20%">
                                Hours&nbsp;&nbsp;&nbsp;
                            </th>
                        </tr>
             </table>
            </div>
        <div id="divTblWorkDoneAdd" style="border:solid; border-width:1; width:95%; height:30%; overflow:scroll; ">
                <center>
                    <table cellpadding="0" cellspacing="0" style="width:96%;" id="tblWorkDone">
                        <tr>
                            <td align="center" style='width: 20%'>

                            </td>
                            <td align="center" style='width: 20%'>

                            </td>
                            <td align="center" style='width: 40%'>

                            </td>
                            <td align="right" style='width: 20%'>

                            </td>
                            <td>

                            </td>
                        </tr>
                    </table>
                </center>
        </div>

                            </div>

                            <div class='tabbertab'>

                                <h2>Parts Used</h2>
                                <p>Parts Used</p>
                            </div>

                            <div class='tabbertab'>
                                <h2>Customer Contact Log</h2>
                                <p>Customer Contact Log</p>
                            </div>
                        </div> </TD>
                </TR>

                <TR bordercolor='#000000'>
                    <TD height='318' bgcolor='#454343'>&nbsp;</TD>
                </TR>
                <TR bordercolor='#000000'>
                    <TD height='142' bgcolor='#454343'></TD>
                </TR>



            </table>

            <input type="submit" value="Submit">


            </form>
        </CENTER>
</body>
<SCRIPT>
     function checkHiddenValue()
     {
        // alert("called");
         alert(document.getElementById("wdPK1").value);
     }
     function removeLast()
     {
        table = document.getElementById("tblWorkDone");
        table.deleteRow(table.rows.length - 1);
     }
       function getBrowser()
       {
            return navigator.appName;
       }
       function workDonePopup()
       {
           if(getBrowser() == 'Microsoft Internet Explorer')
           {
               //showModalDialog does not yield a window.opener type in IE
               //stupid IE!
               window.open('WorkDonePopup.php', null, 'width=500, height=300');
           }
           else
           {
                window.showModalDialog('WorkDonePopup.php', null, 'dialogHeight:300px;dialogWidth:500px;dialogLeft:300;dialogTop:200');
           }
       }
       function editWorkDonePopup(workDoneID, rowID, editOrDelete)
       {
           if(getBrowser() == 'Microsoft Internet Explorer')
           {
               //showModalDialog does not yield a window.opener type in IE
               //stupid IE!
               window.open("EditWorkDonePopup.php?id=" + workDoneID + "&row=" + rowID + "&function=" + editOrDelete, null, 'width=500, height=300');

           }
           else
           {
                window.showModalDialog("EditWorkDonePopup.php?id=" + workDoneID + "&row=" + rowID + "&function=" + editOrDelete, null, 'dialogHeight:300px;dialogWidth:500px;dialogLeft:300;dialogTop:200');
           }
       }
</SCRIPT>
</html>
